//
//  RTImageInfoCell.m
//  RBToyAPI
//
//  Created by baxiang on 2018/2/1.
//  Copyright © 2018年 roobo. All rights reserved.
//

#import "RTImageInfoCell.h"

@implementation RTImageInfoCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        UIImageView *contentImgView = [UIImageView new];
        [self.contentView addSubview:contentImgView];
        contentImgView.contentMode = UIViewContentModeScaleAspectFit;
        [contentImgView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.mas_equalTo(50);
            make.top.mas_equalTo(5);
            make.bottom.mas_equalTo(-5);
            make.left.mas_equalTo(10);
        }];
        
        _contentImgView = contentImgView;
        
        UILabel *contentlab = [UILabel new];
        [self.contentView addSubview:contentlab];
        [contentlab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.bottom.mas_equalTo(0);
            make.left.mas_equalTo(contentImgView.mas_right).offset(5);
        }];
        _contentlab = contentlab;
        
        UIView *bottomLine = [UIView new];
        bottomLine.backgroundColor = UIColorHex(0xe6e6e6);
        [self.contentView addSubview:bottomLine];
        [bottomLine mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.mas_equalTo(0);
            make.height.mas_equalTo(1);
            make.left.right.mas_equalTo(0);
        }];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
